import bot from "../model/bot/amesu";
import { MsgAction, Tpl_wordMap } from "../shared/master/MsgAction";

export default function(data:MsgAction){
    let d = data.data as Tpl_wordMap;

    let map = d.list;
    let str = `┄═══🗺️区域地图══━┄\n`;
    if(d.msg){
        str += `💡${d.msg}\n`
    }
    for (let i = 0; i < map.length; i++) {
        const line_x = map[i];
        for (let j = 0; j < line_x.length; j++) {
            const item = line_x[j];
            if (item == 0) {
                str += '🌲'
            } else if (item == 1) {
                str += '🏕️'
            } else if (item == 2) {
                str += '🔴'
            }else if(item == 3){
                // 有宝箱🎁
                str += '🎁'
            }else if(item == 4){
                // 有人在战斗
                str += '⚔️'
            }else if(item == 5){
                // 有水
                str += '💧'
            }
        }
        str += '\n';
    }
    bot.sendText(data.tolocation,str);
}